package com.javasm.domin.entity.orderEntity;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.*;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.apache.poi.ss.usermodel.HorizontalAlignment;
import org.apache.poi.ss.usermodel.VerticalAlignment;

import java.math.BigDecimal;

/**
 * @Author：liyangsong
 * @Version：1.0
 * @Date：2021/11/29-17:16
 * @Since:jdk1.8
 * @Description:
 */

@Data
@EqualsAndHashCode(callSuper = false)
@TableName("b2c_order_goods")
@ContentRowHeight(35)
@HeadRowHeight(40)
@ColumnWidth(25)
// 头背景设置成红色 IndexedColors.RED.getIndex()
@HeadStyle(horizontalAlignment = HorizontalAlignment.CENTER, verticalAlignment = VerticalAlignment.CENTER, fillForegroundColor = 6)
// 头字体设置成20
@HeadFontStyle(fontHeightInPoints = 20, color = 1)
// 内容的背景设置成绿色 IndexedColors.GREEN.getIndex()
@ContentStyle(verticalAlignment = VerticalAlignment.CENTER, horizontalAlignment = HorizontalAlignment.CENTER)
// 内容字体设置成20
@ContentFontStyle(fontHeightInPoints = 18)
public class B2cOrderGoodsExcel {

    private static final long serialVersionUID = 1L;

    /**
     * 商品id
     */
//    @TableField(value = "goods_id")
    @ExcelProperty("商品id")
    private String goodsId;

    /**
     * 订单id
     */
//    @TableField(value = "order_id")
    @ExcelProperty("订单id")
    private Integer orderId;

    /**
     * 商品名称
     */
//    @TableField(value = "order_product_name")
    @ExcelProperty("商品名称")
    private String orderProductName;

    /**
     * 商品单价
     */
//    @TableField(value = "order_product_price")
    @ExcelProperty("商品单价")
    private BigDecimal orderProductPrice;

    /**
     * 商品数量
     */
//    @TableField(value = "order_product_number")
    @ExcelProperty("商品数量")
    private Integer orderProductNumber;

    /**
     * 商品总价
     */
//    @TableField(value = "order_product_money")
    @ExcelProperty("商品总价")
    private BigDecimal orderProductMoney;


    /**
     * 商品类型
     */
//    @TableField(value = "type_id")
    @ExcelIgnore
    private Integer typeId;

    /**
     * 商品品牌
     */
//    @TableField(value = "brand_id")
    @ExcelIgnore
    private Integer brandId;

    /**
     * 商品型号
     */
//    @TableField(value = "model_id")
    @ExcelIgnore
    private String modelId;

    /**
     * 商品颜色
     */
//    @TableField(value = "color_id")
    @ExcelIgnore
    private Integer colorId;

    /**
     * 销量
     */
//    @TableField(value = "total")
    @ExcelIgnore
    private Integer total;

    /**
     * 总销量
     */
    @ExcelIgnore
    @TableField(exist = false)
    private Integer sales;

    @ExcelIgnore
    private String remark2;
    @ExcelIgnore
    private String remark3;
    @ExcelIgnore
    private String remark4;

}
